package com.glorysoft.knowlespda.bindingadapter

import android.graphics.drawable.Drawable
import android.widget.CheckBox
import android.widget.CompoundButton
import android.widget.TextView
import androidx.databinding.BindingAdapter
import com.glorysoft.knowlespda.entity.BoardIdEntity

/**
 * FileName: TabIndexGridAdapter
 * Author: XJH
 * Date: 2021/5/13 17:46
 * Description:
 * History:
 */
object CheckOnCheckBoardAdapter {

    @BindingAdapter(value = ["boardOnCheck"], requireAll = false)
    @JvmStatic
    fun setBoardOnCheck(checkBox: CheckBox, data : BoardIdEntity) {
        checkBox.setOnCheckedChangeListener { buttonView, isChecked -> data.select = isChecked }
    }

}